package com.oocl.service.impl;

import com.oocl.dao.ClientDao;
import com.oocl.dao.impl.ClientDaoImpl;
import com.oocl.pojo.Client;
import com.oocl.service.ClientService;
import com.oocl.util.UUIDRandom;

/**
 * @description: 
 * @author  XIEMI2
 * @date Aug 3, 2017 7:32:53 PM
 * @version 1.0
 */
public class ClientServiceImpl implements ClientService{

	private ClientDao clientDao;
	
	public ClientServiceImpl() {
		clientDao = new ClientDaoImpl();
	}

	@Override
	public int saveClient(Client client) {
		client.setId(UUIDRandom.uuidRandom());
		return clientDao.saveClient(client);
	}

	@Override
	public Client queryByName(String uname) {
		return clientDao.queryByName(uname);
	}

	@Override
	public Client validateLogin(String uname, String password) {
		return clientDao.validateLogin(uname, password);
	}

}


